def power(a,n):
    if n == 0:
        return 1
    elif n < 0:
        return 1 / power(a,-n)
    else:
        return  a * power(a,n-1)

a = float(input("请输入底数a的值："))
n = float(input("请输入指数n的值："))
result = power(a,n)
print(f"{a}的{n}次方是：{result}")